<template>
  <ComponentContainerProperty v-model="formData.style">
    <el-form label-width="80px" :model="formData">
      <el-form-item label="卡片标题">
        <el-input v-model="formData.title" placeholder="请输入卡片标题" />
      </el-form-item>
      <el-form-item label="标题图标">
        <UploadImg v-model="formData.titleIcon" height="24px" width="24px">
          <template #tip>建议尺寸：24*24</template>
        </UploadImg>
      </el-form-item>
      <el-form-item label="积分文案">
        <el-input v-model="formData.pointLabel" placeholder="请输入积分文案" />
      </el-form-item>
      <el-form-item label="积分图标">
        <UploadImg v-model="formData.pointIcon" height="24px" width="24px">
          <template #tip>建议尺寸：24*24</template>
        </UploadImg>
      </el-form-item>
      <el-form-item label="积分跳转链接">
        <AppLinkInput v-model="formData.pointLink" placeholder="请输入积分跳转链接" />
      </el-form-item>
      <el-form-item label="邀请文案">
        <el-input v-model="formData.inviteLabel" placeholder="请输入邀请文案" />
      </el-form-item>
      <el-form-item label="邀请图标">
        <UploadImg v-model="formData.inviteIcon" height="24px" width="24px">
          <template #tip>建议尺寸：24*24</template>
        </UploadImg>
      </el-form-item>
      <el-form-item label="邀请跳转链接">
        <AppLinkInput v-model="formData.inviteLink" placeholder="请输入邀请跳转链接" />
      </el-form-item>

    </el-form>
  </ComponentContainerProperty>
</template>

<script setup lang="ts">
import { PointAndInviteCardProperty } from './config'
import { usePropertyForm } from '@/components/DiyEditor/util'
// 积分和邀请卡片属性面板
defineOptions({ name: 'PointAndInviteCardProperty' })

const props = defineProps<{ modelValue: PointAndInviteCardProperty }>()
const emit = defineEmits(['update:modelValue'])
const { formData } = usePropertyForm(props.modelValue, emit)
</script>

<style scoped lang="scss"></style>
